const projectInfoModel = require('../models').projectInfo

//获取项目信息
const getProjectInfo = async (req,res)=>{
    let projectInfo = await new Promise((resolve,reject)=>{
        projectInfoModel.find({},{_id:0},(err,docs)=>{
            console.log(docs)
            if(err) reject(err)
            resolve(docs)
        })
    })
    let json = {
        success: true, resultMessage: '', resultCode: '0000', result:projectInfo
    }
    res.send(json)
}

module.exports = {
    getProjectInfo
}